package com.wms.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 记录管理的实体类，对应数据库Record表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("record")
@ApiModel(value="Record对象", description="")
public class Record implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键 id
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 货品id
     */
    @ApiModelProperty(value = "货品id")
    private Integer goodsId;

    /**
     * 执行 出库/入库 的用户
     */
    @ApiModelProperty(value = "取货人/补货人")
    private Integer userId;

    /**
     * 经办人id
     */
    @ApiModelProperty(value = "操作人id")
    private Integer adminId;

    /**
     * 出库/入库 数量
     */
    @ApiModelProperty(value = "数量")
    private Integer count;

    /**
     * 执行操作的时间
     */
    @ApiModelProperty(value = "操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime createTime;

    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    private String action;
}
